public class Point {
    //成员变量
    public int x;
    public int y;
    //构造方法
    public Point(){
        this.getX();
        this.getY();
    }
    public Point(int x,int y){
        this.setX(x);
        this.setY(y);
    }
    //成员方法
    public void setX(int x){
        this.x=x;
    }
    public int getX(){
        return this.x;
    }
    public void setY(int y){
        this.y=y;
    }
    public int getY(){
        return this.y;
    }
    public double distance(Point p){
        double dis=Math.sqrt(Math.pow(this.x+p.x,2)+Math.pow(this.y+p.y,2));
        return dis;
    }
}
